/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace DokuzEylul.Sinav.Entities
{
	/// <summary>
	/// SinavUser object for NHibernate mapped table 'SinavUser'.
	/// </summary>
	[Serializable]
	public class SinavUser : Unipa.Framework.Data.BaseDbEntity 
	{
		#region Member Variables
		protected Guid m_userid;
		protected string m_username;
		protected string m_password;
		protected string m_email;
		#endregion
		#region Constructors
			
		public SinavUser() {}
					
		public SinavUser(Guid userid, string username, string password, string email) 
		{
			this.m_userid= userid;
			this.m_username= username;
			this.m_password= password;
			this.m_email= email;
		}

		public SinavUser(Guid userid)
		{
			this.m_userid= userid;
		}
		
		#endregion
		#region Public Properties
		public  virtual Guid UserId
		{
			get { return m_userid; }
			set {m_userid= value; }
		}
		public  virtual string UserName
		{
			get { return m_username; }
			set {m_username= value; }
		}
		public  virtual string Password
		{
			get { return m_password; }
			set {m_password= value; }
		}
		public  virtual string Email
		{
			get { return m_email; }
			set {m_email= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			SinavUser castObj = (SinavUser)obj;
			return ( castObj != null ) &&
			this.m_userid == castObj.UserId;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * m_userid.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
